Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #2715 +/- ##
==========================================
+ Coverage 39.02% 43.88% +4.86%
==========================================
Files 126 133 +7
Lines 5825 6189 +364
Branches 1546 1655 +109
==========================================
+ Hits 2273 2716 +443
+ Misses 3550 3469 -81
- Partials 2 4 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| pragma solidity ^0.8.0; | ||
|
|
||
| /** | ||
| * @title OUSD Yearn V3 Remote Strategy Mock - the Mainnet part |
There was a problem hiding this comment.
"- the Mainnet part" should probably be "- the L2 chain part"
contracts/contracts/mocks/crosschain/CrossChainRemoteStrategyMock.sol
Outdated
Show resolved
Hide resolved
contracts/contracts/strategies/crosschain/AbstractCCTPIntegrator.sol
Outdated
Show resolved
Hide resolved
contracts/contracts/strategies/crosschain/AbstractCCTPIntegrator.sol
Outdated
Show resolved
Hide resolved
* fix deploy files * minor rename * add calls to Morpho Vault into a try catch * refactor hook wrapper * don't revert if withdraw from underlying fails * use checkBalance for deposit/withdrawal acknowledgment * update message in remote strategy * remove unneeded functions
* add address verification * remove operator check
* fix unit test * add more unit tests * add more unit tests * prettier * add some more unit tests * add thorough unit test support
| /** | ||
| * @dev Send balance update message to the peer strategy | ||
| */ | ||
| function sendBalanceUpdate() |
RequirementsWhat is the PR trying to do? Is this the right thing? Are there bugs in the requirements? Easy ChecksAuthentication
Ethereum
Cryptographic code
Black magic
Overflow
License
Proxy
Events
Medium ChecksRounding and casts
Dependencies
External calls
Deploy
Strategy SpecificStrategy checks
ThinkingLogicAre there bugs in the logic? No
Resource usageThe contract interacts with CCTP contracts (sends/receives messages&USDC), ERC-4626 vaults from Morpho (deposits/withdraws assets for shares), and the OUSD Vault (transfers USDC). Internal StateThe contract enforces that only one transfer can be pending at a time, with pendingAmount tracking in-flight deposits and remoteStrategyBalance caching the remote chain's balance. Before any deposit or withdrawal, the previous transfer must be complete, amounts must be at least 1e6 USDC, and withdrawals cannot exceed the cached remote balance. After a successful round-trip, pendingAmount should reset to zero and remoteStrategyBalance should reflect reality. AttackCode assumes the operator is capable of fixing potential issues with the vaults or CCTP if the operator is not alive funds can be stucked, no outside attack vector. FlavorCode would benefit from a secondary cross chain relayer but this added complexity is not worth the risk of CCTP bridge being down. |
* Add unit tests (#2751) * fix unit test * add more unit tests * add more unit tests * prettier * add some more unit tests * add thorough unit test support * add comment * create a defender task and cleanup * small change * add the ability for the defender relay action to store already processed transactions * update gitignore * prettier * put into a better place * ... * add dry run option, also fix issues with cross chain providers * read cctp domain ids from config * make api a constant * remove finality checks * add custom per chain block lookback * readme change * move all configuration out of cross-chain source file, to more easily support multiple networks and relaying directions * clear the testing addresses * prettier
* [OUSD-09] Check burnToken in relay method * Fix: Check burn token is usdc on remote chain * Add tests
Code Changes
Check readme: https://github.com/OriginProtocol/origin-dollar/blob/shah/cross-chain-strategy-cctpv2/contracts/contracts/strategies/crosschain/crosschain-strategy.md